import App from './App'
import {
	createPinia
} from 'pinia'
import piniaPersist from 'pinia-plugin-persist-uni'

// #ifndef VUE3
import Vue from 'vue'

Vue.use(Vuex)
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'

const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
const pinia = createPinia()
pinia.use(piniaPersist)
export function createApp() {
	const app = createSSRApp(App)
	app.use(pinia); //使用pinia
	return {
		app,
		pinia
	}
}
// #endif